<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>

for(var gongJi=1;gongJi<=20;gongJi++){
for(var muJi=1;muJi<=33;muJi++){
for(var xiaoJi=1;xiaoJi<=300;xiaoJi++){
if(gongJi+xiaoJi+muJi==100 && gongJi*5+muJi*3+xiaoJi*1/3==100){
         console.log('公鸡的数量',gongJi,'母鸡的数量',muJi,'小鸡的数量',xiaoJi);
   }
   }
   }
   }

</script>

    <script>
    function method(num){
for (var i = 2; i < num/2+1; i++) {
if (num%i==0){
    console.log('不是质数');
    return num
}
else{
console.log('是质数');
    return num
}
}
}
method(8)
    </script>